/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.j;

import android.content.Context;
import android.content.Intent;
import com.qihoo.gamecenter.sdk.common.f.b;
import com.qihoo.gamecenter.sdk.common.h.a;
import com.qihoo.gamecenter.sdk.common.i.f;
import com.qihoo.gamecenter.sdk.common.i.s;
import com.qihoo.gamecenter.sdk.pay.k.c;
import java.util.ArrayList;
import java.util.TreeMap;
import org.apache.http.message.BasicNameValuePair;

public class d extends a {
    private a f;
    private final int g = 15;
    private int h;

    public d(Context paramContext, int paramInt, Intent paramIntent) {
        super(paramContext, paramIntent);
        this.h = paramInt;
    }

    public void a(a parama) {
        this.f = parama;
    }

    protected String a(String[] paramArrayOfString) {
        return b(paramArrayOfString);
    }

    protected boolean a() {
        return true;
    }

    private String b(String[] paramArrayOfString) {
        int i = (this.h % 15 == 0) ? this.h / 15 : this.h / 15 + 1;
        int j = (this.h == 0) ? 1 : i + 1;
        TreeMap localTreeMap = new TreeMap();
        localTreeMap.put("page", String.valueOf(j));
        localTreeMap.put("page_size", String.valueOf(15));
        localTreeMap.put("app_key", s.r(this.b));
        localTreeMap.put("user_id", this.c.getStringExtra("qihoo_user_id"));
        localTreeMap.put("access_token", this.c.getStringExtra("access_token"));
        String str1 = this.c.getStringExtra("Type");
        if (!(str1.equals("all")))
            localTreeMap.put("type", str1);
        localTreeMap.put("t", String.valueOf(System.currentTimeMillis()));
        c.a("HistoryRecordTask", new Object[] { "count = ", Integer.valueOf(this.h) });
        c.a("HistoryRecordTask", new Object[] { "page = ", Integer.valueOf(j) });
        String str2 = "https://mgame.360.cn/page/history_list_v2";
        String str3 = s.a(localTreeMap, s.s(this.b));
        c.a("HistoryRecordTask", new Object[] { str2, "?", str3 });
        this.e = s.b();
        String str4 = f.c(str3, this.e);
        String str5 = b.a().a(this.e);
        ArrayList localArrayList = new ArrayList();
        localArrayList.add(new BasicNameValuePair("k", str5));
        localArrayList.add(new BasicNameValuePair("d", str4));
        return this.a.a(localArrayList, str2, this.e);
    }

    protected void a(String paramString) {
        super.a(paramString);
        if (this.f == null)
            return;
        this.f.a(paramString);
    }

    public static abstract interface a {
        public abstract void a(String paramString);
    }
}